package com.xiaohuihui.springbootes.springbootes.service.impl;

import com.xiaohuihui.springbootes.springbootes.dao.EsTestDao;
import com.xiaohuihui.springbootes.springbootes.entity.UserEntity;
import com.xiaohuihui.springbootes.springbootes.service.EsTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EsTestServiceImpl implements EsTestService {

    @Autowired
    private EsTestDao esTestDao;

    @Override
    public void save(UserEntity userEntity) {
        esTestDao.save(userEntity);
    }

    @Override
    public List<UserEntity> findByUsername(String username) {
        return esTestDao.findUserEntityByUsername(username);
    }

    @Override
    public List<UserEntity> findBySex(String sex) {
        return esTestDao.findUserEntityBySex(sex);
    }
}
